import request from "../../common/request";
// 获取维保任务
export function mainList(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-plant/getMaintain`,
    method: "post",
    data: data,
  });
}
//获取巡检工单 /treatment-inspect/getInspectOrder
export function insList(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/inspect-point/list-outPage`,
    method: "get",
    data: data,
  });
}
//报停通知
export function stopNotice(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-plant/stop-notice`,
    method: "post",
    data: data,
  });
}
//报停详情
export function stopNoticeDetail(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-plant/stop-getDetails?id=${data}`,
    method: "post",
    data: data,
  });
}
//报修通知
export function repairNotice(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-plant/repair-notice`,
    method: "post",
    data: data,
  });
}
//报备通知/treatment-plant/fail-notice
export function plantNotice(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-plant/fail-notice`,
    method: "post",
    data: data,
  });
}
//报修详情
export function repairNoticeDetail(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-plant/repair-getDetails?id=${data}`,
    method: "post",
    data: data,
  });
}
//生产报备 http://127.0.0.1:20001/knowledge-base/productionFail
export function addBase(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/productionFail`,
    method: "post",
    data: data,
  });
}
//报备详情
export function plantNoticeDetail(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-plant/fail-getDetails?id=${data}`,
    method: "post",
    data: data,
  });
}
//设备列表 /device/list
export function deviceList(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/device/listOutPage`,
    method: "post",
    data: data,
  });
}
//维保-设备报停 /treatment-plant/treatment-stop
export function addStop(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-plant/treatment-stop`,
    method: "post",
    data: data,
  });
}
//维保-派发维保 /treatment-plant/distributeMaintain
export function addDisMain(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-plant/distributeMaintain`,
    method: "post",
    data: data,
  });
}
//巡检-设备保修 /treatment-inspect/device-repair
export function addRepair(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-inspect/device-repair`,
    method: "post",
    data: data,
  });
}
//平台常用量管理
export function typeList(data) {
  return request.request({
    url: '/constant/getAllConstant',
    method: 'post',
    data,
  })
}
// 展示具体常量值
export function detail(data) {
  return request.request({
    url: `/constant/getSpecificConstant?id=${data.id}`,
    method: 'post',
    // data,
  })
}
//用户列表
export function getUser(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/repair-maintain-task/RepairOperator`,
    method: "post",
    data: data,
  });
}
//巡检-巡检对象
export function inspect(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-inspect/list`,
    method: "get",
    data: data,
  });
}
//发布巡检工单 /treatment-inspect/distribute-inspect
export function Addinspect(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-inspect/distribute-inspect`,
    method: "post",
    data: data,
  });
}
//部门列表
export function deptList(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/dept/listOutPage`,
    method: "get",
    data: data,
  });
}
//维保首页 http://127.0.0.1:20001/repair-maintain-task/getRepairNum
export function repairNum(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/repair-maintain-task/getRepairNum`,
    method: "post",
    data: data,
  });
}
//巡检首页 http://127.0.0.1:20001/treatment-inspect/getInspectNum
export function insNum(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-inspect/getInspectNum`,
    method: "post",
    data: data,
  });
}
//接受维保任务 http://127.0.0.1:20001/treatment-plant/acceptMaintain?id=4
export function acceptWb(data) {
  return request.request({
    url: `/treatment-plant/acceptMaintain?id=${data}`,
    method: "post",
    data: data,
  });
}
//首页维保图表 http://127.0.0.1:20001/repair-maintain-task/homePageChart?unitTime=7
export function indexMain(data) {
  return request.request({
    url: `/repair-maintain-task/homePageChart?unitTime=${data}`,
    method: "post",
    data: data,
  });
}
//首页巡检图表 http://127.0.0.1:20001/treatment-inspect/homePageChart?unitTime=7
export function indexIns(data) {
  return request.request({
    url: `/treatment-inspect/homePageChart?unitTime=${data}`,
    method: "post",
    data: data,
  });
}
//首页知识库图表 http://127.0.0.1:20001/knowledge-base/homePageChartKon?unitTime=7
export function indexKnow(data) {
  return request.request({
    url: `/knowledge-base/homePageChartKon?unitTime=${data}`,
    method: "post",
    data: data,
  });
}
//知识库首页 http://127.0.0.1:20001/knowledge-base/trainAndLearn
export function knowNum(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/trainAndLearn`,
    method: "post",
    data: data,
  });
}
//考试列表 http://127.0.0.1:20001/knowledge-base/showExam
export function knowList(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/showExam`,
    method: "post",
    data: data,
  });
}
//知识库列表详情 /knowledge-base/examDetails
export function knoewDetail(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/examDetails?id=${data}`,
    method: "post",
    data: data,
  });
}
//获取待参加考试 /knowledge-base/getNotExam
export function getNotExam(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/getNotExam`,
    method: "post",
    data: data,
  });
}
//发布考试/knowledge-base/post_exam
export function postExam(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/post-exam`,
    method: "post",
    data: data,
  });
}
//取消未完成的考试 http://127.0.0.1:20001/knowledge-base/delExam?id=70574425009157
export function delExam(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/delExam?id=${data}`,
    method: "post",
    data: data,
  });
}
//选择考试人员 /knowledge-base/examinable-person
export function choosePerson(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/examinable-person`,
    method: "get",
    data: data,
  });
}
//试卷列表 /item-bank/list
export function bankList(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/test-paper/normal-list`,
    method: "post",
    data: data,
  });
}
//考试编辑 http://127.0.0.1:20001/knowledge-base/updateExam
export function updateExam(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/updateExam`,
    method: "post",
    data: data,
  });
}
//我的考试记录 /knowledge-base/exam-record
export function myRecord(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/exam-record`,
    method: "post",
    data: data,
  });
}
//专家建议列表 /expert-advice/list
export function adviceList(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/expert-advice/list`,
    method: "get",
    data: data,
  });
}
//题库资料 http://127.0.0.1:20001/knowledge-base/exam-show
export function exanList(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/exam-show`,
    method: "post",
    data: data,
  });
}
//题库资料内容查询 http://127.0.0.1:20001/knowledge-base/examDetail-show?ids=1,2
export function exanDetail(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/knowledge-base/examDetail-show?paperId=${data}`,
    method: "post",
    data: data,
  });
}
//领导登录信息 http://127.0.0.1:20001/treatment-plant/LeaderLog
export function LeaderLogList(data) {
  console.log(data, "传递的参数");
  return request.request({
    url: `/treatment-plant/LeaderLog`,
    method: "post",
    data: data,
  });
}
//专家功能分享经验 
export function expertAdviceAdd(data) {
  return request.request({
    url: '/expert-advice/add',
    method: 'post',
    data,
  })
}
//完成考试 http://127.0.0.1:20001/knowledge-base/mark-papers
export function donePaper(data) {
  return request.request({
    url: '/knowledge-base/mark-papers',
    method: 'post',
    data,
  })
}
//今日累计完成学习培训数量 http://127.0.0.1:20001/knowledge-base/finishTestNum
export function finishTestNum(data) {
  return request.request({
    url: '/knowledge-base/finishTestNum',
    method: 'post',
    data,
  })
}
//信息投放 http://127.0.0.1:20001/treatment-plant/informationDelivery
export function infoFb(data) {
  return request.request({
    url: '/treatment-plant/informationDelivery',
    method: 'post',
    data,
  })
}
//待处理详情
export function getMaintainDetail(data) {
  return request.request({
    url: `/treatment-plant/getMaintainDetail?id=${data}`,
    method: 'post',
    data,
  })
}
//待处理详情 巡检 treatment-inspect/getInspectOrderDetail
export function getInspectOrderDetail(data) {
  return request.request({
    url: `/treatment-inspect/getInspectOrderDetail?id=${data}`,
    method: 'post',
    data,
  })
}
//取消巡检工单 
export function delInspectOrder(data) {
  return request.request({
    url: `/treatment-inspect/delInspectOrder?id=${data}`,
    method: 'post',
    data,
  })
}
//接单巡检 treatment-inspect/accept-inspectOrder
export function acceptXj(data) {
  return request.request({
    url: `/treatment-inspect/accept-inspectOrder?id=${data}`,
    method: "post",
    data: data,
  });
}
//完成维保工单
export function doneWbTask(data) {
  return request.request({
    url: `/treatment-plant/completeMaintain`,
    method: "post",
    data: data,
  });
}
//取消维保任务 http://127.0.0.1:20001/repair-maintain-task/delete/5
export function cancelWbTask(data) {
  return request.request({
    url: `/repair-maintain-task/delete/${data}`,
    method: "delete",
    data: data,
  });
}
//设备列表 /part/listOutPage
export function partList(data) {
  return request.request({
    url: `/part/listOutPage`,
    method: "post",
    data: data,
  });
}
//巡检扫码完成工单 /treatment-inspect/teoCodeFinishInspectOrder
export function scanCode(data) {
  return request.request({
    url: `/treatment-inspect/teoCodeFinishInspectOrder`,
    method: "post",
    data: data,
  });
}
//安全培训 /knowledge-base/getNotExam
export function getKaoshi(data) {
  return request.request({
    url: `/knowledge-base/getNotExam`,
    method: "post",
    data: data,
  });
}
// getDeptList 部门列表
export function getDeptList(data) {
  return request.request({
    url: `/dept/listOutPage`,
    method: 'get',
    params: data,
  })
}
//巡检管理列表 https://huijuniot.net.cn/prod-api/inspect-point/addPoint
export function getInspectList(data) {
  return request.request({
    url: `/inspect-point/list-outPage`,
    method: "post",
    data: data,
  });
}
//新增巡检任务 
export function addInspectPoint(data) {
  return request.request({
    url: `/inspect-point/addPoint`,
    method: 'post',
    data,
  })
}
//编辑巡检 
export function updateInspectPoint(data) {
  return request.request({
    url: `/inspect-point/update`,
    method: 'put',
    data,
  })
}
//删除巡检点 http://192.168.1.200:20001/inspect-point/del/10
export function inspectDel(data) {
  return request.request({
    url: `/inspect-point/del/${data}`,
    method: 'DELETE',
    data,
  })
}